#ifndef SM4_CRYPTO_H
#define SM4_CRYPTO_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stddef.h>

#define SM4_KEY_SIZE 16

extern int sm4CbcEncrypt(const unsigned char *pucKey, size_t stKeyLen, const unsigned char *pucIv, size_t stIvLen, const unsigned char *pucPlaintext, size_t stPlaintextLen, unsigned char *pucCiphertext, size_t *pstCiphertextLen);
extern int sm4CbcDecrypt(const unsigned char *pucKey, size_t stKeyLen, const unsigned char *pucIv, size_t stIvLen, const unsigned char *pucCiphertext, size_t stCiphertextLen, unsigned char *pucPlaintext, size_t *pstPlaintextLen);
extern int sm4EcbEncrypt(const unsigned char *pucKey, size_t stKeyLen, const unsigned char *pucPlaintext, size_t stPlaintextLen, unsigned char *pucCiphertext, size_t *pstCiphertextLen);
extern int sm4EcbDecrypt(const unsigned char *pucKey, size_t stKeyLen, const unsigned char *pucCiphertext, size_t stCiphertextLen, unsigned char *pucPlaintext, size_t *pstPlaintextLen);

#ifdef __cplusplus
}
#endif

#endif